/**
 * @flow
 */

import React, { Component } from 'react';
import {
    StyleSheet,
    Text,
    View,
    Dimensions,
    TouchableOpacity,
    Image,
    ScrollView
} from 'react-native';
import MineCell from '../mine/MineCell';
import MineMiddleView from '../mine/MineMiddleView';
import MineHeader from '../mine/MineHeader';

const deviceWidth =  Dimensions.get('window').width;

export default class Mine extends Component {
    static navigationOptions = {
        headerTitle:
            <View style={{height:1000,backgroundColor:'rgba(255,96,0,1.0)',flexDirection:'row',alignItems:'center',justifyContent:'space-between',width:deviceWidth}}>
                <Text style={{color:'white',marginLeft:10}}>我的</Text>
                <TouchableOpacity><Image source={require('../image/icon_mine_setting.png')} style={{width:25,height:25,tintColor:'white',marginRight:10}}/></TouchableOpacity>
            </View>
    }
    
    render() {
        return (
            <ScrollView>
                <MineHeader/>
                <View style={{marginTop:10}}>
                    <MineCell title='我的订单' icon='wddd' rightText='查看全部订单'/>
                    <MineMiddleView/>
                </View>
                <View style={{marginTop:10}}>
                    <MineCell title='小马哥钱包' icon='xmgqb' rightText='账户余额：100元'/>
                    <MineCell title='抵用券' icon='dyq' rightText='0'/>
                </View>
                <View style={{marginTop:10}}>
                    <MineCell title='积分商城' icon='jfsc'/>
                </View>
                <View style={{marginTop:10}}>
                    <MineCell title='今日推荐' icon='jrtj' newImageDisplay={true}/>
                </View>
                <View style={{marginTop:10}}>
                    <MineCell title='我要合作' icon='wyhz' rightText='轻松开店，招财进宝'/>
                </View>
            </ScrollView>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#F5FCFF',
    }
});
